package com.kensure.shike.weixinpay.model;

import java.util.HashMap;
import java.util.Map;

public class WXPayinfo2 implements java.io.Serializable {

	private static final long serialVersionUID = 3545276994084105527L;
	private String appid;// 小程序ID
	private String mch_id;// 商户号
	private String device_info;// 设备号
	private String nonce_str;// 随机字符串
	private String sign;// 签名
	private String body;// 商品描述
	private String detail;// 商品详情
	private String attach;// 附加数据
	private String out_trade_no;// 商户订单号
	private String fee_type;// 货币类型
	private String spbill_create_ip;// 终端IP
	private String time_start;// 交易起始时间
	private String time_expire;// 交易结束时间
	private String goods_tag;// 商品标记
	private String total_fee;// 总金额
	private String notify_url;// 通知地址
	private String trade_type;// 交易类型
	private String limit_pay;// 指定支付方式
	private String openid;// 用户标识

	public String getAppid() {
		return appid;
	}

	public void setAppid(String appid) {
		this.appid = appid;
	}

	public String getMch_id() {
		return mch_id;
	}

	public void setMch_id(String mch_id) {
		this.mch_id = mch_id;
	}

	public String getNonce_str() {
		return nonce_str;
	}

	public void setNonce_str(String nonce_str) {
		this.nonce_str = nonce_str;
	}

	public String getSign() {
		return sign;
	}

	public void setSign(String sign) {
		this.sign = sign;
	}

	public String getBody() {
		return body;
	}

	public void setBody(String body) {
		this.body = body;
	}

	public String getOut_trade_no() {
		return out_trade_no;
	}

	public void setOut_trade_no(String out_trade_no) {
		this.out_trade_no = out_trade_no;
	}

	public String getTotal_fee() {
		return total_fee;
	}

	public void setTotal_fee(String total_fee) {
		this.total_fee = total_fee;
	}

	public String getNotify_url() {
		return notify_url;
	}

	public void setNotify_url(String notify_url) {
		this.notify_url = notify_url;
	}

	public String getTrade_type() {
		return trade_type;
	}

	public void setTrade_type(String trade_type) {
		this.trade_type = trade_type;
	}

	public String getOpenid() {
		return openid;
	}

	public void setOpenid(String openid) {
		this.openid = openid;
	}

	public String getSpbill_create_ip() {
		return spbill_create_ip;
	}

	public void setSpbill_create_ip(String spbill_create_ip) {
		this.spbill_create_ip = spbill_create_ip;
	}

	public String getDevice_info() {
		return device_info;
	}

	public void setDevice_info(String device_info) {
		this.device_info = device_info;
	}

	public String getDetail() {
		return detail;
	}

	public void setDetail(String detail) {
		this.detail = detail;
	}

	public String getAttach() {
		return attach;
	}

	public void setAttach(String attach) {
		this.attach = attach;
	}

	public String getFee_type() {
		return fee_type;
	}

	public void setFee_type(String fee_type) {
		this.fee_type = fee_type;
	}

	public String getTime_start() {
		return time_start;
	}

	public void setTime_start(String time_start) {
		this.time_start = time_start;
	}

	public String getTime_expire() {
		return time_expire;
	}

	public void setTime_expire(String time_expire) {
		this.time_expire = time_expire;
	}

	public String getGoods_tag() {
		return goods_tag;
	}

	public void setGoods_tag(String goods_tag) {
		this.goods_tag = goods_tag;
	}

	public String getLimit_pay() {
		return limit_pay;
	}

	public void setLimit_pay(String limit_pay) {
		this.limit_pay = limit_pay;
	}

	public WXPayinfo2(){
		
	}
	
	public WXPayinfo2(WXPayinfo info) {
		this.setAppid(info.getAppid());
		this.setMch_id(info.getMch_id());
		this.setNonce_str(info.getNonce_str());
		this.setBody(info.getBody());
		this.setOut_trade_no(info.getOut_trade_no());
		this.setTotal_fee(info.getTotal_fee());
		this.setSpbill_create_ip(info.getSpbill_create_ip());
		this.setNotify_url(info.getNotify_url());
		this.setTrade_type(info.getTrade_type());
		this.setOpenid(info.getOpenid());
		this.setTime_expire(info.getTime_expire());
	}

	/**
	 * 统一支付接口
	 * 
	 * @return
	 */
	public Map<String, Object> toUnitMap() {
		Map<String, Object> sParaTemp = new HashMap<String, Object>();
		sParaTemp.put("appid", this.getAppid());
		sParaTemp.put("mch_id", this.getMch_id());
		sParaTemp.put("nonce_str", this.getNonce_str());
		sParaTemp.put("body", this.getBody());
		sParaTemp.put("out_trade_no", this.getOut_trade_no());
		sParaTemp.put("total_fee", this.getTotal_fee());
		sParaTemp.put("spbill_create_ip", this.getSpbill_create_ip());
		sParaTemp.put("notify_url", this.getNotify_url());
		sParaTemp.put("trade_type", this.getTrade_type());
		sParaTemp.put("openid", this.getOpenid());
		sParaTemp.put("time_expire", this.getTime_expire());
		return sParaTemp;
	}
}